{% extends "base.html" %}
{% block content %}
    <form action="" method="post" name="register">
        <div class="col-lg-3 hidden-md"></div>
        <div class="col-lg-6 col-md-12">
            <div class="page-header">
                <h3>注册</h3>
            </div>
            <div class="input-group">
                <label id="labelUsername" class="input-group-addon">用户名</label>
                {{ form.username(**{'class':'form-control', 'placeholder':'用户名', 'aria-describedby':'labelUsername'})}}
            </div>
            {% for error in form.username.errors %}
                <b style="color:red">{{ error }}</b>
            {% endfor %}
            <br />
            <div class="input-group">
                <label id="labelPassword" class="input-group-addon">密码</label>
                {{ form.password(**{'class':'form-control', 'placeholder':'密码', 'aria-describedby':'labelPassword'})}}
            </div>
            {% for error in form.password.errors %}
                <b style="color:red">{{ error }}</b>
            {% endfor %}
            <br />
            <div class="input-group">
                <label id="labelConfirm" class="input-group-addon">确认密码</label>
                {{ form.confirm(**{'class':'form-control', 'placeholder':'确认密码', 'aria-describedby':'labelConfirm'})}}
            </div>
            {% for error in form.confirm.errors %}
                <b style="color:red">{{ error }}</b>
            {% endfor %}
            <br />
            <input type="submit" name="submit" value="确定" class="btn btn-success">
            <p>已有帐号? <a href="{{ url_for('login') }}">点我登录</a> </p>

        </div>
        <div class="col-lg-3 hidden-md"></div>
    </form>
{% endblock %}
